package com.sap.tpcd.policybuilder.policymodel ;


/**
 * @author I068988
 * @version 1.0
 * @created 30-sept.-2011 14:12:33
 */
public class Ressource {

	private String name;
	private Object ressourceType;

	public Ressource(){

	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @return the ressourceType
	 */
	public Object getRessourceType() {
		return ressourceType;
	}

	/**
	 * @param ressourceType the ressourceType to set
	 */
	public void setRessourceType(Object ressourceType) {
		this.ressourceType = ressourceType;
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#hashCode()
	 */
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((name == null) ? 0 : name.hashCode());
		result = prime * result
				+ ((ressourceType == null) ? 0 : ressourceType.hashCode());
		return result;
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	@Override
	public boolean equals(Object obj) {
		if (this == obj) {
			return true;
		}
		if (obj == null) {
			return false;
		}
		if (!(obj instanceof Ressource)) {
			return false;
		}
		Ressource other = (Ressource) obj;
		if (name == null) {
			if (other.name != null) {
				return false;
			}
		} else if (!name.equals(other.name)) {
			return false;
		}
		if (ressourceType == null) {
			if (other.ressourceType != null) {
				return false;
			}
		} else if (!ressourceType.equals(other.ressourceType)) {
			return false;
		}
		return true;
	}


}